package com.hnkywl.sts.entity.organ;

import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.util.List;

/**
 * 说明：企业机构
 * 包:        com.hnkywl.sts.entity.organ
 * 类描述:    企业机构
 * 修改备注: [说明本次修改内容]
 * 版本:        [v1.0]
 */
@Entity
@Where(clause = "deleted!='1'")

@DiscriminatorValue("qyjg")
public class Qyjg extends Gsjg {
    /**
     * 联系人
     */
    private String lxr;
    /**
     * 联系电话
     */
    private String lxdh;

    /**
     * 经营模式
     */
    @OneToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL, targetEntity = Jyms.class)
    @JoinColumn(name = "JYMS_ID")
    private Jyms jyms;

    /**
     * 开户行
     */
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "qyjg", targetEntity = Khh.class)
    @Where(clause = "deleted!='1'")
    private List<Khh> khhList;

    @ManyToMany(
            mappedBy = "sy",
            targetEntity = Lj.class
    )
    private List<Lj> syljList;

    @ManyToMany(
            mappedBy = "xy",
            targetEntity = Lj.class
    )
    private List<Lj> xyljList;

    /**
     * 是否零售
     */
    private Boolean sfls = false;

    /**
     * 零售客户
     */
    private Boolean lskh = false;

    /**
     * 企业法人号
     */
    private String qyfrh;

    /**
     * 组织机构号
     */
    private String zzjgh;

    /**
     * 纳税号
     */
    private String nsh;

    // 是否线上赎货:1是，其他不是
    private String sfbggys;

    // 保证金比例
    private Double bzjbl;

    public String getLxr() {
        return lxr;
    }

    public void setLxr(String lxr) {
        this.lxr = lxr;
    }

    public String getLxdh() {
        return lxdh;
    }

    public void setLxdh(String lxdh) {
        this.lxdh = lxdh;
    }

    public Jyms getJyms() {
        return jyms;
    }

    public void setJyms(Jyms jyms) {
        this.jyms = jyms;
    }


    public List<Khh> getKhhList() {
        return khhList;
    }

    public void setKhhList(List<Khh> khhList) {
        this.khhList = khhList;
    }

    public List<Lj> getSyljList() {
        return syljList;
    }

    public void setSyljList(List<Lj> syljList) {
        this.syljList = syljList;
    }

    public List<Lj> getXyljList() {
        return xyljList;
    }

    public void setXyljList(List<Lj> xyljList) {
        this.xyljList = xyljList;
    }

    public Boolean getSfls() {
        return sfls;
    }

    public void setSfls(Boolean sfls) {
        this.sfls = sfls;
    }

    public String getSfbggys() {
        return sfbggys;
    }

    public void setSfbggys(String sfbggys) {
        this.sfbggys = sfbggys;
    }

    public Boolean getLskh() {
        return lskh;
    }

    public void setLskh(Boolean lskh) {
        this.lskh = lskh;
    }

    public String getQyfrh() {
        return qyfrh;
    }

    public void setQyfrh(String qyfrh) {
        this.qyfrh = qyfrh;
    }

    public String getZzjgh() {
        return zzjgh;
    }

    public void setZzjgh(String zzjgh) {
        this.zzjgh = zzjgh;
    }

    public String getNsh() {
        return nsh;
    }

    public void setNsh(String nsh) {
        this.nsh = nsh;
    }

    public String className() {
        return "Qyjg";
    }

    public Double getBzjbl() {
        return bzjbl;
    }

    public void setBzjbl(Double bzjbl) {
        this.bzjbl = bzjbl;
    }
}
